package com.qf.openapi.web.master.service;

import com.qf.openapi.web.master.entity.User;
import com.qf.openapi.web.master.vo.*;
import org.springframework.transaction.annotation.Transactional;
import sun.text.resources.FormatData;

import java.io.IOException;

public interface UserSevice {

	public User getUser( Integer id );

	User login( String username,String password );

	User selectByName( String username );

	@Transactional(rollbackFor=Exception.class)
	public Integer insertUser( User user );

	@Transactional(rollbackFor=Exception.class)
	Integer register( String realPath,FormData formData ) throws IOException;

	@Transactional(rollbackFor=Exception.class)
	TableVo< User > getUsers( Integer page,Integer limit );

	Integer deleteUserByName( String name );

	Integer add( String realPath,AddFormData addformData ) throws IOException;

	Result deleteUsers( int[] arr );

	Integer updateById( String realPath,AddFormData addformData ) throws IOException;

	TableVo< User> getUsersByContdition( Integer page,Integer limit,UserVo userVo );

	String export( ) throws IOException, IllegalAccessException, ClassNotFoundException;

}
